Skip to content

feat(id): NoteRef board-post model + embeds edge (#7587 slice 1) - #7953

Merged
dezren39 merged 1 commit into
mainfrom
queue/14142-7587-noteref-post-model
Nov 14, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/14142-7587-noteref-post-model

Conversation

@dezren39

@dezren39 dezren39 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Slice 1 of the note→board sharing model for #7587 (decision record on #5830): the data model.

  • Post gains an optional note_ref: NoteRef — note object id, home server, pinned version id + content hash, sharer attribution. The post stores a reference, never note content (the reference-not-content invariant everything else hangs on).
  • Back-compat: note_ref is #[serde(default, skip_serializing_if = "Option::is_none")]; v1 post bodies written before this field decode as None (covered by a test).
  • Authority: a note reference must be signed by its named sharer (attribution cannot be forged either direction). The note target is deliberately NOT a graph dependency — it lives on its home server, so insertion never requires it and replication closure never claims it.
  • Edges: BoardGraph::note_embeds() projects every post —embeds→ note edge in deterministic hash order; BoardGraph::note_backlinks(note) returns the posts sharing a note. (Full backlink query surface / jump-through parity is Slice 3.)

Tests: cargo test -p id-core boards:: — 36 passed (4 new: embeds edge to an absent note, sharer-must-sign both directions, shape rejects bad sharer / empty home server, v1 body without note_ref decodes as None). cargo check -p id-core --all-targets --all-features passes (one pre-existing residency.rs missing-docs warning). Local clippy was unavailable in this worktree's toolchain and the full id check needs the built web/dist assets; CI's id checks cover both.

Remaining on #7587 (task 14142 tracks them): Slice 2 — live/pinned views + reply anchoring (exact/relocated/orphaned); Slice 3 — backlink parity + attributed changelog events; Slice 4 — cross-server grant-checked, hash-verified resolution + two-server E2E.

Refs #7587, #5830.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 9, 2026 04:48
@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8182154d-c6dc-436e-a296-817ba3874c03
Commits

Reviewing files that changed from the base of the PR and between 4502bb4 and 1ac6ba5.

Files selected for processing: 2

  • pkgs/id/src/boards.rs
  • pkgs/id/src/boards/records.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T04:48:34.697179Z
We couldn’t complete this review. Comment @codex review to try again.
93b51a6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39
dezren39 force-pushed the queue/14142-7587-noteref-post-model branch 3 times, most recently from 16635aa to f601dd0 Compare November 14, 2026 22:09
Shepherd port of 93b51a6: main split Post/Board records into boards/records.rs and GamePostRef into boards/game.rs, so the rebase conflicted structurally. Same change, placed in the new layout: NoteRef + Post::note_ref in records.rs; validate_shape/validate_links rules, note_embeds/note_backlinks, tests in boards.rs. No semantic changes.
@dezren39
dezren39 force-pushed the queue/14142-7587-noteref-post-model branch from f601dd0 to 1ac6ba5 Compare November 14, 2026 22:27
@dezren39

Copy link
Copy Markdown
Member Author

agent-note:v1
state: in-progress
task: 17265 (lane any-a, pr_shepherd)
Shepherd port: the original head 93b51a6 no longer rebased — main split the board records out of pkgs/id/src/boards.rs into pkgs/id/src/boards/records.rs (Post/Board/…) and GamePostRef into boards/game.rs, and the mechanical rebase re-introduced duplicate struct definitions. The change was therefore hand-ported onto current main as 1ac6ba5 with no semantic changes: NoteRef + Post::note_ref now live in boards/records.rs; the validate_shape rule, the validate_links sharer-attribution rule, note_embeds/note_backlinks, and all four tests live in boards.rs. Two porting defects were caught by the test run and fixed before this head: a serde attribute that lost its quotes, and the sharer check initially nested inside the embed_ref block.
Verification: cargo test -p id --lib boards:: — 61 passed, 0 failed (including all four new tests: embeds edge to an absent note, sharer-must-sign both directions, shape rejects bad sharer / empty home server, v1 body without note_ref decodes as None). No held labels; Codex/CodeRabbit produced no findings (usage/rate limits).
Merging on its merits; issue #7587 stays open for slices 2-4.

@dezren39
dezren39 merged commit 3f7bbc4 into main Nov 14, 2026
1 check passed
@dezren39
dezren39 deleted the queue/14142-7587-noteref-post-model branch November 14, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant